from pywebio import *
from startPywebio8001 import start8001
import uuid

# def get_mac_address():
#     mac=uuid.UUID(int = uuid.getnode()).hex[-12:]
#     return ":".join([mac[e:e+2] for e in range(0,11,2)])

def count(mac):
    import hashlib
    sha1 = hashlib.sha1()
    data = str(mac) + 'hr' + str(mac)

    sha1.update(data.encode('utf-8'))
    sha1_data = sha1.hexdigest()
    return sha1_data

def main():  # PyWebIO application function

    mac = input.input("input mac")
    sha1_data = count(mac)
    output.put_text("password is :", sha1_data)
    
start_server(main, port=8003, debug=True)